from lib import gets
from threading import Thread
from tkinter import *
import time,os
# from PIL import Image
# from pystray import MenuItem, Menu
'''
class Windows():
    def __init__(self,log):
        self.root=Tk()
        self.log=log
        self.list=Frame(self.root)
        self.threads=[]
        self.deamon=Thread(target=self.is_alives,daemon=True)
        self.deamon.start()
        self.sesson=gets.Get()
    def cout(self,*string):
        if self.log:
            string=[str(word) for word in string]
            print(" ".join(list(string)))
    def is_alives(self):
        while True:
            time.sleep(2.5)
            tmp=0
            self.cout(self.threads)
            for i in self.threads:
                if not i.is_alive():
                    self.cout("pop ",self.threads[tmp],tmp)
                    self.threads.pop(tmp)
                tmp+=1
    def search(self,inputs):
        tmp=Thread(target=lambda:self.sesson.get(inputs),daemon=True)
        self.threads.append(tmp)
        self.threads[-1].start()
        # self.sesson.get(inputs)
    def loop(self):
        self.root.mainloop()

window=Windows(False)
window.search(input("请输入音乐名称 "))
window.loop()'''
os.system("title music_download")
get=gets.Get()
get.get(input("请输入音乐名称 "))
time.sleep(1)